package org.smartagents.global;

import org.smartagents.util.Utils;

import java.awt.*;

public abstract class Identifiable extends Trigerable {

    private int x;

    private int y;

    private Color color;

    public abstract String identify();


    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public Color getColor() {
        if (color == null) {
            color = Utils.calculateColor(this.toString());
        }
        return color;
    }
}
